/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date           Author       Notes
* 2018-10-17     flybreak      the first version
*/

#ifndef _DRV_BEEP_H
#define _DRV_BEEP_H
#include "os_types.h"

//#define ENABLE_PASSIVE_BUZSER

#ifdef ENABLE_PASSIVE_BUZSER
#define BEEP_PWM_DEVICE  "pwm00"
#define BEEP_PWM_CH       0
bool beep_set(uint32_t freq); 				  //蜂鸣器设定
int32_t beep_init(void);                      //蜂鸣器初始化
#else
#include <pin.h>
#include "drv_gpio.h"
#if defined(EVC30_EU)
#define BUZZER_PIN      GET_PIN(D,0)
#elif defined(EVC30_NA)
#define BUZZER_PIN      GET_PIN(E, 9)
#endif
#endif  /* ENABLE_PASSIVE_BUZSER */
void beep_on(void);                           //蜂鸣器开
void beep_off(void);                          //蜂鸣器关

#endif
